<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Dashboard Template for Bootstrap</title>

    <!-- Bootstrap core CSS 这里需要更换-->
    <!-- <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">  -->
    <link href="/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template 这里需要更换-->
    <!-- <link href="dashboard.css" rel="stylesheet"> -->
    <link href="/public/css/main.css" rel="stylesheet">
</head>

<body>
    <div style="padding:0 200px 100px;">
        <div>
            <h3 style="display: inline-block;  margin-bottom: 20px;">数据库操作</h3>
            <a href="/students/new" class="btn btn-success">添加学生</a>
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>序号</th>
                            <th>姓名</th>
                            <th>性别</th>
                            <th>年龄</th>
                            <th>爱好</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        {{each students111}}
                        <tr>
                            <td>{{ $value.id }}</td>
                            <td>{{ $value.name }}</td>
                            <td>{{ $value.gender }}</td>
                            <td>{{ $value.age }}</td>
                            <td>{{ $value.hobbies }}</td>
                            <td>
                                <!-- 本地的db.json -->
                                <a href="/students/edit?id={{$value.id}}">编辑</a>
                                <a href="/students/delete?id={{$value.id}}">删除</a>

                                <!-- mongDB改造 -->
                                <!-- <a href="/students/edit?id={{$value._id}}">编辑</a>
                                <a href="/students/delete?id={{$value._id}}">删除</a> -->
                            </td>
                        </tr>
                        {{/each}}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    </div>
</body>

</html>